package com.hl.card.credit.service.remote;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hl.card.credit.domain.RemoteUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class RemoteUserReslove implements RemoteUserService{

    @Autowired
    private RemoteUserService remoteUserService;

    @Override
    public String sayHiFromClientOne(String a) {
        return null;
    }

    @Override
    public JSONObject regSsoUser(String phone, String phoneCode) {
        return null;
    }

    @Override
    public JSONObject register(String mobilePhone, String loginPwd, String phoneCode) {
        return null;
    }

    @Override
    public JSONObject findSsoUserByPhone(String mobile) {
        return null;
    }

    @Override
    public RemoteUser findSsoUserByUserId(String userId) {
        Map<String,Object> obj= (Map<String, Object>) remoteUserService.findSsoUserByUserId(userId);
        if(obj.get("code").equals("0")){
            String str= JSON.toJSONString(obj.get("user"));
            return  JSONObject.parseObject(str, RemoteUser.class);
        }
        return null;
    }
    @Override
    public JSONObject setSsoUserPasswordByPhone(String mobile, String code) {
        return null;
    }

    @Override
    public Object login(String loginAccount, String loginPwd, String gustId, String vrifyCode) {
        return null;
    }

    @Override
    public JSONObject checkImageCode(String gustId, String verifyCode) {
        return null;
    }

    @Override
    public JSONObject sendPCode(String phoneNum, String code) {
        return null;
    }

    @Override
    public JSONObject sendPCode(String phoneNum) {
        return null;
    }

    @Override
    public JSONObject vrifyPhoneCode(String phoneNum, String code) {
        return null;
    }
}
